<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="jquery-3.6.0.min.js" type="text/javascript"></script>
	</head>
	<body>
		<div id="div">1111</div>
		<div class="class1">2222</div>
		<p>
			<span>
				<a id="a" href="#">sss</a>
			</span>
		</p>
		<ul>
			<li>1</li>
			<li>2</li>
			<li>3</li>
			<li>4</li>
		</ul>
		<form action="" id="form1">
			<input type="text" name="" id="" value="" />
			<input type="password" name="" id="" value="" />
			<input type="radio" name="" id="" value="" />
		</form>
	</body>
	<script type="text/javascript">
		const a = document.getElementById('div')
		console.dir(a)
		
		//jquery获取id
		const b = $("#div")[0];
		console.dir(b)
		//jueryhu获取class
		const e = $(".class1")[0];
		console.dir(e)
		//jqueryh获取tagName
		const f = $("div")
		console.dir(f)
		//一次性获得多个标签
		const g = $("#div,.class,p")
		console.dir(g)
		//子选择器
		const h = $("p > span > #a")
		console.dir(h)
		//ul下的第一个li
		//first
		const i = $("ul > li:first")
		console.dir(i)
		//:odd 下标从0开始的奇数行
		const j = $("ul > li:odd")
		console.dir(j)
		//：even 下标从0开始的偶数行
		const k = $("ul > li:even")
		console.dir(k)
		//input
		const l = $(":input")
		console.dir(l)
		
		const m = $("#form1 > :password")
		console.dir(m)
		const n = $("#form1 > :radio")
		console.dir(n)
	</script>
</html>
